<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>es5后元素的获取</title>
</head>

<body>
		<h1>helloworld1</h1>
		<h1>helloworld2</h1>
		<h1 id="abc">helloworld3</h1>
		<h1 class="cba">helloworld4</h1>
		<h1 class="cba">helloworld5</h1>
		<div id="d1">
			<h1 class="cc">helloworld6</h1>
		</div>
	<script type="text/javascript">

		var a = document.querySelector('.cba');
		console.log(a);

		var b1 = document.querySelector('#abc');
		var b2 = document.getElementById('abc');
		console.log(b1===b2);



		var c = document.querySelectorAll('.cba');
		console.log(c);






	</script>
</body>

</html>